package com.example.springbootprinciple.listener;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContextInitializer;
import org.springframework.context.ConfigurableApplicationContext;

public class HelloApplicationContextInitializer implements ApplicationContextInitializer<ConfigurableApplicationContext>{

    Logger logger = LoggerFactory.getLogger(getClass());


    @Override
    public void initialize(ConfigurableApplicationContext applicationContext) {

        logger.info("HelloApplicationContextInitializer.initialize =============已启动");

        logger.info("IOC 容器是 \t"+ applicationContext.toString());

    }
}
